Wireless Access Method and Related Device And System

ABSTRACT

Embodiments of the present invention provide a wireless access method and a related device and system, where the method includes: reading, by a terminal device, access point information stored in an external near field communication tag; and acquiring, by the terminal device, one piece of target access point information according to the read access point information, and establishing, according to the target access point information, a wireless connection to an access point to which the target access point information belongs.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/106,732, filed on Jun. 20, 2016, which is a national stage ofInternational Application No. PCT/CN2013/090125, filed on Dec. 20, 2013.Both of the aforementioned applications are hereby incorporated byreference in their entireties.

TECHNICAL FIELD

The present invention relates to the field of communicationstechnologies, and in particular, to a wireless access method and arelated device and system.

BACKGROUND

Currently, an increasing quantity of WIFI access points are deployed inpublic places such as an airport, a mall, and a station, so that a userin a public place can implement interconnection with the Internet byaccessing a WIFI access point. In a practical application, a process inwhich a user accesses a WIFI access point is generally as follows: Theuser enables WIFI access point search on a terminal device (for example,a mobile phone); after the terminal device obtains a WIFI access pointby means of search, sends a wireless connection request to the WIFIaccess point; after a prompt of entering a password is received from theWIFI access point, the user enters the password, and the terminal devicesends the password to the WIFI access point; and after the WIFI accesspoint verifies that the password is correct, the terminal device isallowed to access the WIFI access point, so that interconnection betweenthe terminal device and the Internet is implemented.

It is found from practice that, in the foregoing process of accessingthe WIFI access point, the user not only needs to manually enable WIFIaccess point search, but also needs to manually enter a password.Consequently, accessing is time-consuming and laborious, and efficiencyin accessing the WIFI access point is reduced.

SUMMARY

Embodiments of the present invention disclose a wireless access methodand a related device and system, which can effectively improveefficiency in accessing an access point.

A first aspect of the embodiments of the present invention discloses awireless access method. The method includes reading, by a terminaldevice, access point information stored in an external near fieldcommunication (NFC) tag. The method also includes acquiring, by theterminal device, one piece of target access point information accordingto the read access point information, and establishing, according to thetarget access point information, a wireless connection to an accesspoint to which the target access point information belongs.

In a first possible implementation manner of the first aspect of theembodiments of the present invention, the acquiring, by the terminaldevice, one piece of target access point information according to theread access point information includes: detecting, by the terminaldevice, a signal strength value of an access point to which each pieceof the read access point information belongs; and selecting, by theterminal device, access point information of an access point whosesignal strength value is the largest as the target access pointinformation.

In a second possible implementation manner of the first aspect of theembodiments of the present invention, the acquiring, by the terminaldevice, one piece of target access point information according to theread access point information includes: detecting, by the terminaldevice, a signal strength value of an access point to which each pieceof the read access point information belongs; outputting, by theterminal device, each piece of the read access point information and thesignal strength value of the access point to which the access pointinformation belongs; and detecting, by the terminal device, one piece ofaccess point information that is selected by a user according to thesignal strength value from the access point information output by theterminal device, and using the piece of access point information as atarget access point account.

With reference to the first aspect of the embodiments of the presentinvention or either of the first and the second possible implementationmanners of the first aspect of the embodiments of the present invention,in a third possible implementation manner of the first aspect of theembodiments of the present invention, the access point informationincludes an access point account.

With reference to the third possible implementation manner of the firstaspect of the embodiments of the present invention, in a fourth possibleimplementation manner of the first aspect of the embodiments of thepresent invention, the establishing, by the terminal device according tothe target access point information, a wireless connection to an accesspoint to which the target access point information belongs includes:sending, by the terminal device according to a target access pointaccount, a wireless connection request to an access point to which thetarget access point account belongs; and receiving, by the terminaldevice, a wireless connection success response sent by the access pointto which the target access point account belongs.

With reference to the first aspect of the embodiments of the presentinvention or either of the first and the second possible implementationmanners of the first aspect of the embodiments of the present invention,in a fifth possible implementation manner of the first aspect of theembodiments of the present invention, the access point informationincludes an access point account and an access password bound to theaccess point account.

With reference to the fifth possible implementation manner of the firstaspect of the embodiments of the present invention, in a sixth possibleimplementation manner of the first aspect of the embodiments of thepresent invention, the establishing, by the terminal device according tothe target access point information, a wireless connection to an accesspoint to which the target access point information belongs includes:sending, by the terminal device according to a target access pointaccount, a wireless connection request to an access point to which thetarget access point account belongs, where the wireless connectionrequest includes an access password bound to the target access pointaccount; and receiving a wireless connection success response that issent after the access point to which the target access point accountbelongs verifies that the access password bound to the target accesspoint account is correct.

With reference to the fifth possible implementation manner of the firstaspect of the embodiments of the present invention, in a seventhpossible implementation manner of the first aspect of the embodiments ofthe present invention, the establishing, by the terminal deviceaccording to the target access point information, a wireless connectionto an access point to which the target access point information belongsincludes: sending, by the terminal device according to a target accesspoint account, a wireless connection request to an access point to whichthe target access point account belongs; receiving, by the terminaldevice, prompt information sent by the access point to which the targetaccess point account belongs, where the prompt information is used toprompt sending of an access password bound to the target access pointaccount; sending, by the terminal device, the access password bound tothe target access point account to the access point to which the targetaccess point account belongs; and receiving, by the terminal device, awireless connection success response that is sent after the access pointto which the target access point account belongs verifies that theaccess password bound to the target access point account is correct.

With reference to the first aspect of the embodiments of the presentinvention or either of the first and the second possible implementationmanners of the first aspect of the embodiments of the present invention,in an eighth possible implementation manner of the first aspect of theembodiments of the present invention, after the reading, by a terminaldevice, access point information stored in an external near fieldcommunication tag, the method further includes: storing, by the terminaldevice, the access point information.

With reference to the eighth possible implementation manner of the firstaspect of the embodiments of the present invention, in a ninth possibleimplementation manner of the first aspect of the embodiments of thepresent invention, after the storing, by the terminal device, the accesspoint information, the method further includes: determining, by theterminal device, whether a storage time of the access point informationexceeds a preset threshold; and if the storage time exceeds the presetthreshold, deleting the stored access point information.

With reference to the eighth possible implementation manner of the firstaspect of the embodiments of the present invention, in a tenth possibleimplementation manner of the first aspect of the embodiments of thepresent invention, after the storing, by the terminal device, the accesspoint information, the method further includes: detecting, by theterminal device, whether a wireless disconnection instruction entered bythe user is received; and if the wireless disconnection instructionentered by the user is received, deleting the stored access pointinformation.

With reference to the first aspect of the embodiments of the presentinvention or either of the first and the second possible implementationmanners of the first aspect of the embodiments of the present invention,in an eleventh possible implementation manner of the first aspect of theembodiments of the present invention, the access point informationincludes one or more pieces of WIFI access point information andBluetooth access point information.

A second aspect of the embodiments of the present invention discloses acomputer storage medium, where the computer storage medium stores aprogram, and when the program is executed, all steps of the wirelessaccess method disclosed in the first aspect of the embodiments of thepresent invention are executed.

A third aspect of the embodiments of the present invention discloses aterminal device. The terminal device includes a reading module,configured to read access point information stored in an external NFCtag. The terminal device also includes a main control module, configuredto: acquire one piece of target access point information according tothe access point information read by the reading module, and output theone piece of target access point information to a radio frequencymodule. The terminal device also includes the radio frequency module,configured to establish, according to the target access pointinformation output by the main control module, a wireless connection toan access point to which the target access point information belongs.

In a first possible implementation manner of the third aspect of theembodiments of the present invention, the main control module includes:a detection unit, configured to: detect a signal strength value of anaccess point to which each piece of the access point information read bythe reading module belongs, and output the signal strength value to aselection unit; and the selection unit, configured to: select, from theaccess point information read by the reading module and according to thesignal strength value that is of the access point to which each piece ofthe access point information belongs and that is output by the detectionunit, access point information of an access point whose signal strengthvalue is the largest as the target access point information, and outputthe target access point information to the radio frequency module.

In a second possible implementation manner of the third aspect of theembodiments of the present invention, the main control module includes:a first detection unit, configured to: detect a signal strength value ofan access point to which each piece of the access point information readby the reading module belongs, and output the signal strength value toan input/output unit; the input/output unit, configured to output eachpiece of the access point information read by the reading module and thesignal strength value that is of the access point to which the accesspoint information belongs and that is detected by the first detectionunit; and a second detection unit, configured to: detect one piece oftarget access point information that is selected by a user according tothe signal strength value from the access point information output bythe input/output unit, and output the one piece of target access pointinformation to the radio frequency module.

With reference to the third aspect of the embodiments of the presentinvention or either of the first and the second possible implementationmanners of the third aspect of the embodiments of the present invention,in a third possible implementation manner of the third aspect of theembodiments of the present invention, the access point informationincludes an access point account.

With reference to the third possible implementation manner of the thirdaspect of the embodiments of the present invention, in a fourth possibleimplementation manner of the third aspect of the embodiments of thepresent invention, the radio frequency module is configured to: send,according to a target access point account output by the main controlmodule, a wireless connection request to an access point to which thetarget access point account belongs; and receive a wireless connectionsuccess response sent by the access point to which the target accesspoint account belongs.

With reference to the third aspect of the embodiments of the presentinvention or either of the first and the second possible implementationmanners of the third aspect of the embodiments of the present invention,in a fifth possible implementation manner of the third aspect of theembodiments of the present invention, the access point informationincludes an access point account and an access password bound to theaccess point account.

With reference to the fifth possible implementation manner of the thirdaspect of the embodiments of the present invention, in a sixth possibleimplementation manner of the third aspect of the embodiments of thepresent invention, the radio frequency module includes: a reading unit,configured to: read, from the reading module according to a targetaccess point account output by the main control module, an accesspassword bound to the target access point account, and output the accesspassword to a communication unit; and the communication unit, configuredto: send, according to a target access point account output by the maincontrol module, a wireless connection request to an access point towhich the target access point account belongs, where the wirelessconnection request includes the access password that is bound to thetarget access point account and that is output by the reading unit; andreceive a wireless connection success response that is sent after theaccess point to which the target access point account belongs verifiesthat the access password bound to the target access point account iscorrect.

With reference to the fifth possible implementation manner of the thirdaspect of the embodiments of the present invention, in a seventhpossible implementation manner of the third aspect of the embodiments ofthe present invention, the radio frequency module includes: acommunication unit, configured to: send, according to a target accesspoint account output by the main control module, a wireless connectionrequest to an access point to which the target access point accountbelongs; receive prompt information sent by the access point to whichthe target access point account belongs; and enable a reading unit,where the prompt information is used to prompt sending of an accesspassword bound to the target access point account; and the reading unit,configured to: read, from the reading module according to a targetaccess point account output by the main control module, the accesspassword bound to the target access point account, and output the accesspassword to the communication unit; where the communication unit isfurther configured to: send the access password bound to the targetaccess point account to the access point to which the target accesspoint account belongs; and receive a wireless connection successresponse that is sent after the access point to which the target accesspoint account belongs verifies that the access password bound to thetarget access point account is correct.

With reference to the third aspect of the embodiments of the presentinvention or either of the first and the second possible implementationmanners of the third aspect of the embodiments of the present invention,in an eighth possible implementation manner of the third aspect of theembodiments of the present invention, the terminal device furtherincludes: a storage module, configured to store the access pointinformation read by the reading module.

With reference to the eighth possible implementation manner of the thirdaspect of the embodiments of the present invention, in a ninth possibleimplementation manner of the third aspect of the embodiments of thepresent invention, the terminal device further includes: a processingmodule, configured to: determine whether a storage time for storing theaccess point information by the storage module exceeds a presetthreshold; and if the storage time exceeds the preset threshold, enablea first control module; and the first control module, configured todelete the access point information stored by the storage module.

With reference to the eighth possible implementation manner of the thirdaspect of the embodiments of the present invention, in a tenth possibleimplementation manner of the third aspect of the embodiments of thepresent invention, the terminal device further includes: a thirddetection module, configured to: detect whether a wireless disconnectioninstruction entered by the user is received; and if the wirelessdisconnection instruction entered by the user is received, enable asecond control module; and the second control module, configured todelete the access point information stored by the storage module.

With reference to the third aspect of the embodiments of the presentinvention or either of the first and the second possible implementationmanners of the third aspect of the embodiments of the present invention,in an eleventh possible implementation manner of the third aspect of theembodiments of the present invention, the access point informationincludes one or more pieces of WIFI access point information andBluetooth access point information.

A fourth aspect of the embodiments of the present invention discloses aterminal device, including a processor, a near field communication NFCmodule and an input/output module that are connected to the processor byusing an interface, a memory that is connected to the processor by usinga bus, a coupler that is connected to the processor by using multiplenetwork interfaces, and an antenna module that is connected to thecoupler. The memory stores a group of program code, and the processor isconfigured to invoke the program code stored in the memory, so as toexecute the following operations: controlling the NFC module to readaccess point information stored in an external NFC tag; and acquiringone piece of target access point information according to the readaccess point information, and establishing, according to the targetaccess point information, a wireless connection between the antennamodule and an access point to which the target access point informationbelongs.

In a first possible implementation manner of the fourth aspect of theembodiments of the present invention, that the processor acquires theone piece of target access point information according to the readaccess point information includes: controlling the antenna module todetect a signal of an access point to which each piece of the readaccess point information belongs; calculating a signal strength valuethat is of the access point to which each piece of the access pointinformation belongs and that is detected by the antenna module; andselecting access point information of an access point whose signalstrength value is the largest as the target access point information.

In a second possible implementation manner of the fourth aspect of theembodiments of the present invention, that the processor acquires theone piece of target access point information according to the readaccess point information includes: controlling the antenna module todetect a signal of an access point to which each piece of the readaccess point information belongs; calculating a signal strength valuethat is of the access point to which each piece of the access pointinformation belongs and that is detected by the antenna module;controlling the input/output module to output each piece of the accesspoint information and the signal strength value that is of the accesspoint to which the access point information belongs and that is obtainedby means of calculation; and controlling the input/output module todetect any piece of access point information that is selected by a useraccording to the signal strength value from the access point informationoutput by the input/output module, and use the piece of access pointinformation as the target access point information.

With reference to the fourth aspect of the embodiments of the presentinvention or either of the first and the second possible implementationmanners of the fourth aspect of the embodiments of the presentinvention, in a third possible implementation manner of the fourthaspect of the embodiments of the present invention, the access pointinformation includes an access point account.

With reference to the third possible implementation manner of the fourthaspect of the embodiments of the present invention, in a fourth possibleimplementation manner of the fourth aspect of the embodiments of thepresent invention, that the processor establishes, according to thetarget access point information, the wireless connection between theantenna module and the access point to which the target access pointinformation belongs includes: controlling the antenna module to send,according to a target access point account, a wireless connectionrequest to an access point to which the target access point accountbelongs, so that the antenna module receives a wireless connectionsuccess response sent by the access point to which the target accesspoint account belongs.

With reference to the fourth aspect of the embodiments of the presentinvention or either of the first and the second possible implementationmanners of the fourth aspect of the embodiments of the presentinvention, in a fifth possible implementation manner of the fourthaspect of the embodiments of the present invention, the access pointinformation includes an access point account and an access passwordbound to the access point account.

With reference to the fifth possible implementation manner of the fourthaspect of the embodiments of the present invention, in a sixth possibleimplementation manner of the fourth aspect of the embodiments of thepresent invention, that the processor establishes, according to thetarget access point information, the wireless connection between theantenna module and the access point to which the target access pointinformation belongs includes: controlling the antenna module to send,according to a target access point account, a wireless connectionrequest to an access point to which the target access point accountbelongs, where the wireless connection request includes an accesspassword bound to the target access point account, so that the antennamodule receives a wireless connection success response that is sentafter the access point to which the target access point account belongsverifies that the access password bound to the target access pointaccount is correct.

With reference to the fifth possible implementation manner of the fourthaspect of the embodiments of the present invention, in a seventhpossible implementation manner of the fourth aspect of the embodimentsof the present invention, that the processor establishes, according tothe target access point information, the wireless connection between theantenna module and the access point to which the target access pointinformation belongs includes: controlling the antenna module to send,according to a target access point account, a wireless connectionrequest to an access point to which the target access point accountbelongs, so that the antenna module receives prompt information sent bythe access point to which the target access point account belongs, wherethe prompt information is used to prompt sending of an access passwordbound to the target access point account, and so that the antenna modulesends the access password bound to the target access point account tothe access point to which the target access point account belongs, andreceives a wireless connection success response that is sent after theaccess point to which the target access point account belongs verifiesthat the access password bound to the target access point account iscorrect.

With reference to the fourth aspect of the embodiments of the presentinvention or either of the first and the second possible implementationmanners of the fourth aspect of the embodiments of the presentinvention, in an eighth possible implementation manner of the fourthaspect of the embodiments of the present invention, the processorfurther executes the following operation: controlling the memory tostore the read access point information.

With reference to the eighth possible implementation manner of thefourth aspect of the embodiments of the present invention, in a ninthpossible implementation manner of the fourth aspect of the embodimentsof the present invention, the processor further executes the followingoperations: determining whether a storage time of the access pointinformation exceeds a preset threshold; and if the storage time exceedsthe preset threshold, controlling the memory to delete the stored accesspoint information.

With reference to the eighth possible implementation manner of thefourth aspect of the embodiments of the present invention, in a tenthpossible implementation manner of the fourth aspect of the embodimentsof the present invention, the processor further executes the followingoperations: detecting whether the input/output module receives awireless disconnection instruction entered by the user; and if theinput/output module receives the wireless disconnection instructionentered by the user, controlling the memory to delete the stored accesspoint information.

With reference to the fourth aspect of the embodiments of the presentinvention or either of the first and the second possible implementationmanners of the fourth aspect of the embodiments of the presentinvention, in an eleventh possible implementation manner of the fourthaspect of the embodiments of the present invention, the access pointinformation includes one or more pieces of WIFI access point informationand Bluetooth access point information.

A fifth aspect of the embodiments of the present invention discloses awireless access system, including: a terminal device, and a near fieldcommunication tag and an access point to which target access pointinformation belongs that are independent of the terminal device. Thenear field communication tag is configured to store access pointinformation. The terminal device is configured to: read the access pointinformation stored in the near field communication tag, acquire onepiece of the target access point information according to the readaccess point information, and establish, according to the target accesspoint information, a wireless connection to the access point to whichthe target access point information belongs.

In a first possible implementation manner of the fifth aspect of theembodiments of the present invention, a manner in which the terminaldevice acquires one piece of the target access point informationaccording to the read access point information is specifically asfollows: the terminal device is configured to: detect a signal strengthvalue of an access point to which each piece of the read access pointinformation belongs, and select access point information of an accesspoint whose signal strength value is the largest as a target accesspoint account.

In a second possible implementation manner of the fifth aspect of theembodiments of the present invention, a manner in which the terminaldevice acquires one piece of the target access point informationaccording to the read access point information is specifically asfollows: the terminal device is configured to: detect a signal strengthvalue of an access point to which each piece of the read access pointinformation belongs, and output each piece of the read access pointinformation and the detected signal strength value of the access pointto which the access point information belongs; and detect one piece ofaccess point information that is selected by a user according to thesignal strength value from the access point information output by theterminal device, and use the piece of access point information as thetarget access point information.

With reference to the fifth aspect of the embodiments of the presentinvention or either of the first and the second possible implementationmanners of the fifth aspect of the embodiments of the present invention,in a third possible implementation manner of the fifth aspect of theembodiments of the present invention, the access point informationincludes an access point account.

With reference to the third possible implementation manner of the fifthaspect of the embodiments of the present invention, in a fourth possibleimplementation manner of the fifth aspect of the embodiments of thepresent invention, a manner in which the terminal device establishes,according to the target access point information, the wirelessconnection to the access point to which the target access pointinformation belongs is specifically as follows: the terminal device isconfigured to: send, according to a target access point account, awireless connection request to an access point to which the targetaccess point account belongs; and receive a wireless connection successresponse sent by the access point to which the target access pointaccount belongs.

With reference to the fifth aspect of the embodiments of the presentinvention or either of the first and the second possible implementationmanners of the fifth aspect of the embodiments of the present invention,in a fifth possible implementation manner of the fifth aspect of theembodiments of the present invention, the access point informationincludes an access point account and an access password bound to theaccess point account.

With reference to the fifth possible implementation manner of the fifthaspect of the embodiments of the present invention, in a sixth possibleimplementation manner of the fifth aspect of the embodiments of thepresent invention, a manner in which the terminal device establishes,according to the target access point information, the wirelessconnection to the access point to which the target access pointinformation belongs is specifically as follows: the terminal device isconfigured to: send, according to a target access point account, awireless connection request to an access point to which the targetaccess point account belongs, where the wireless connection requestincludes an access password bound to the target access point account;and receive a wireless connection success response that is sent afterthe access point to which the target access point account belongsverifies that the access password bound to the target access pointaccount is correct.

With reference to the fifth possible implementation manner of the fifthaspect of the embodiments of the present invention, in a seventhpossible implementation manner of the fifth aspect of the embodiments ofthe present invention, a manner in which the terminal deviceestablishes, according to the target access point information, thewireless connection to the access point to which the target access pointinformation belongs is specifically as follows: the terminal device isconfigured to: send, according to a target access point account, awireless connection request to an access point to which the targetaccess point account belongs; receive prompt information sent by theaccess point to which the target access point account belongs, where theprompt information is used to prompt sending of an access password boundto the target access point account; send the access password bound tothe target access point account to the access point to which the targetaccess point account belongs; and receive a wireless connection successresponse that is sent after the access point to which the target accesspoint account belongs verifies that the access password bound to thetarget access point account is correct.

With reference to the fifth aspect of the embodiments of the presentinvention or either of the first and the second possible implementationmanners of the fifth aspect of the embodiments of the present invention,in an eighth possible implementation manner of the fifth aspect of theembodiments of the present invention, the terminal device is furtherconfigured to store the access point information after reading theaccess point information stored in the external near field communicationtag.

With reference to the eighth possible implementation manner of the fifthaspect of the embodiments of the present invention, in a ninth possibleimplementation manner of the fifth aspect of the embodiments of thepresent invention, the terminal device is further configured to: afterstoring the access point information, determine whether a storage timeof the access point information exceeds a preset threshold; and if thestorage time exceeds the preset threshold, delete the stored accesspoint information.

With reference to the eighth possible implementation manner of the fifthaspect of the embodiments of the present invention, in a tenth possibleimplementation manner of the fifth aspect of the embodiments of thepresent invention, the terminal device is further configured to: afterstoring the access point information, detect whether a wirelessdisconnection instruction entered by the user is received; and if thewireless disconnection instruction entered by the user is received,delete the stored access point information.

With reference to the fifth aspect of the embodiments of the presentinvention or either of the first and the second possible implementationmanners of the fifth aspect of the embodiments of the present invention,in an eleventh possible implementation manner of the fifth aspect of theembodiments of the present invention, the access point informationincludes one or more pieces of WIFI access point information andBluetooth access point information.

Compared with the prior art, the embodiments of the present inventionhave the following beneficial effects.

In the embodiments of the present invention, a terminal device may readaccess point information stored in an NFC tag, and may acquire one pieceof target access point information according to the read access pointinformation; further, the terminal device may establish, according tothe target access point information, a wireless connection to an accesspoint to which the target access point information belongs, therebyimplementing automatically access to the access point to which thetarget access point information belongs. Implementing the embodiments ofthe present invention can avoid operations such as manually enablingaccess point search and manually entering a password by a user, so thatefficiency in accessing an access point can be effectively improved.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions in the embodiments of the presentinvention more clearly, the following briefly describes the accompanyingdrawings required for describing the embodiments. Apparently, theaccompanying drawings in the following description show merely someembodiments of the present invention, and persons of ordinary skill inthe art may still derive other drawings from these accompanying drawingswithout creative efforts.

FIG. 1 is a schematic flowchart of a wireless access method according toan embodiment of the present invention;

FIG. 2 is a schematic flowchart of another wireless access methodaccording to an embodiment of the present invention;

FIG. 3 is a schematic flowchart of another wireless access methodaccording to an embodiment of the present invention;

FIG. 4 is a schematic flowchart of another wireless access methodaccording to an embodiment of the present invention;

FIG. 5 is a schematic flowchart of another wireless access methodaccording to an embodiment of the present invention;

FIG. 6 is a schematic interface diagram of a WIFI access point accountand a signal strength value of a WIFI access point to which the WIFIaccess point account belongs that are output by a terminal deviceaccording to an embodiment of the present invention;

FIG. 7 is a schematic flowchart of another wireless access methodaccording to an embodiment of the present invention;

FIG. 8 is a schematic structural diagram of a terminal device accordingto an embodiment of the present invention;

FIG. 9 is a schematic structural diagram of another terminal deviceaccording to an embodiment of the present invention;

FIG. 10 is a schematic structural diagram of another terminal deviceaccording to an embodiment of the present invention;

FIG. 11 is a schematic structural diagram of another terminal deviceaccording to an embodiment of the present invention;

FIG. 12 is a schematic structural diagram of another terminal deviceaccording to an embodiment of the present invention;

FIG. 13 is a schematic structural diagram of another terminal deviceaccording to an embodiment of the present invention;

FIG. 14 is a schematic structural diagram of another terminal deviceaccording to an embodiment of the present invention; and

FIG. 15 is a schematic network diagram of a wireless access systemaccording to an embodiment of the present invention.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

The following describes the technical solutions in the embodiments ofthe present invention with reference to the accompanying drawings in theembodiments of the present invention. Apparently, the describedembodiments are merely a part rather than all of the embodiments of thepresent invention. All other embodiments obtained by persons of ordinaryskill in the art based on the embodiments of the present inventionwithout creative efforts shall fall within the protection scope of thepresent invention.

The embodiments of the present invention disclose a wireless accessmethod and a related device and system, which can effectively improveefficiency in accessing an access point. Detailed descriptions areseparately provided in the following.

Referring to FIG. 1, FIG. 1 is a schematic flowchart of a wirelessaccess method according to an embodiment of the present invention. Thewireless access method shown in FIG. 1 may include the following steps.

101. A terminal device reads access point information stored in anexternal NFC tag.

102. The terminal device acquires one piece of target access pointinformation according to the read access point information, andestablishes, according to the target access point information, awireless connection to an access point to which the target access pointinformation belongs.

In this embodiment of the present invention, the terminal device mayinclude a terminal device such as a smartphone, a tablet computer, apersonal digital assistant (PDA), or a mobile Internet device (MID)having an NCF module, which is not repeated subsequently in thisembodiment of the present invention. The terminal device may include atleast one processor, and the terminal device may work under the controlof the at least one processor.

In this embodiment of the present invention, a user may hold theterminal device to approach the external NFC tag, so that the terminaldevice may read, by using the NCF module of the terminal device, theaccess point information stored in the external NFC tag.

In an optional implementation manner, the NFC tag may store only onepiece of access point information, or the NFC tag may store multiplepieces of access point information, which is not limited in thisembodiment of the present invention.

In an optional implementation manner, the access point information mayinclude one or more pieces of WIFI access point information andBluetooth access point information. The WIFI access point informationmay include a WIFI access point account and an access password bound tothe WIFI access point account, and the Bluetooth access pointinformation may include a Bluetooth access point account and an accesspassword bound to the Bluetooth access point account.

In an optional implementation manner, in the foregoing step 102, thatthe terminal device acquires the one piece of target access pointinformation according to the read access point information may includethe following steps:

Step (11): The terminal device detects a signal strength value of anaccess point to which each piece of the read access point informationbelongs.

Step (12): The terminal device selects access point information of anaccess point whose signal strength value is the largest as the targetaccess point information.

By performing step (11) and step (12), the terminal device canautomatically select, in the background, the access point information ofthe access point whose signal strength value is the largest as thetarget access point information.

In another optional implementation manner, in the foregoing step 102,that the terminal device acquires the one piece of target access pointinformation according to the read access point information may includethe following steps.

Step (21): The terminal device detects a signal strength value of anaccess point to which each piece of the read access point informationbelongs.

Step (22): The terminal device outputs each piece of the read accesspoint information and the signal strength value of the access point towhich the access point information belongs.

Step (23): The terminal device detects one piece of access pointinformation that is selected by a user according to the signal strengthvalue from the access point information output by the terminal device,and uses the piece of access point information as a target access pointaccount.

By performing steps (21) to (23), the user can select desirable accesspoint information as the target access point information.

In this embodiment of the present invention, the access pointinformation may include an access point account, or the access pointinformation may include an access point account and an access passwordbound to the access point account, which is not limited in thisembodiment of the present invention.

For example, when the access point information includes an access pointaccount, in the foregoing step 102, that the terminal deviceestablishes, according to the target access point information, thewireless connection to the access point to which the target access pointinformation belongs may include the following steps.

Step (31): The terminal device sends, according to a target access pointaccount, a wireless connection request to an access point to which thetarget access point account belongs, where the wireless connectionrequest includes an access password bound to the target access pointaccount.

Step (32): The terminal device receives a wireless connection successresponse that is sent after the access point to which the target accesspoint account belongs verifies that the access password bound to thetarget access point account is correct.

By performing step (31) and step (32), if the access password is notrequired, the terminal device can automatically access the access pointto which the target access point information belongs, to establish thewireless connection between the terminal device and the access point towhich the target access point information belongs.

For another example, when the access point information includes anaccess point account and an access password bound to the access pointaccount, in the foregoing step 102, that the terminal deviceestablishes, according to the target access point information, thewireless connection to the access point to which the target access pointinformation belongs may include the following steps.

Step (41): The terminal device sends, according to a target access pointaccount, a wireless connection request to an access point to which thetarget access point account belongs, where the wireless connectionrequest includes an access password bound to the target access pointaccount.

Step (42): The terminal device receives a wireless connection successresponse that is sent after the access point to which the target accesspoint account belongs verifies that the access password bound to thetarget access point account is correct.

By performing step (41) and step (42), if the access password isrequired, the terminal device can quickly and automatically access theaccess point to which the target access point information belongs, toestablish the wireless connection between the terminal device and theaccess point to which the target access point information belongs.

For another example, when the access point information includes anaccess point account and an access password bound to the access pointaccount, in the foregoing step 102, that the terminal deviceestablishes, according to the target access point information, thewireless connection to the access point to which the target access pointinformation belongs may include the following steps.

Step (51): The terminal device sends, according to a target access pointaccount, a wireless connection request to an access point to which thetarget access point account belongs.

Step (52): The terminal device receives prompt information sent by theaccess point to which the target access point account belongs, where theprompt information is used to prompt sending of an access password boundto the target access point account.

Step (53): The terminal device sends the access password bound to thetarget access point account to the access point to which the targetaccess point account belongs.

Step (54): The terminal device receives a wireless connection successresponse that is sent after the access point to which the target accesspoint account belongs verifies that the access password bound to thetarget access point account is correct.

By performing step (51) and step (52), if the access password isrequired, the terminal device can automatically access, by using anexisting wireless access manner, the access point to which the targetaccess point information belongs, to establish the wireless connectionbetween the terminal device and the access point to which the targetaccess point information belongs.

In an optional implementation manner, in the wireless access methoddescribed in FIG. 1, after executing step 101, the terminal device mayfurther store the read access point information.

In another optional implementation manner, in the wireless access methoddescribed in FIG. 1, after the terminal device stores the read accesspoint information, the terminal device may further determine whether astorage time of the access point information exceeds a preset threshold;and if the storage time exceeds the preset threshold, delete the storedaccess point information. Alternatively, after the terminal devicestores the read access point information, the terminal device may detectwhether a wireless disconnection instruction entered by the user isreceived; and if the wireless disconnection instruction entered by theuser is received, delete the stored access point information. Therefore,storage space of the terminal device that is occupied by the accesspoint information can be released.

In this embodiment of the present invention, in the wireless accessmethod described in FIG. 1, operations such as manually enabling accesspoint search and manually entering a password by a user can be avoided,so that efficiency in accessing an access point can be effectivelyimproved.

Referring to FIG. 2, FIG. 2 is a schematic flowchart of a wirelessaccess method according to an embodiment of the present invention. Inthe wireless access method described in FIG. 2, an example in whichaccess point information includes an access point account and an accesspassword bound to the access point account is used for description. Thewireless access method shown in FIG. 2 may include the following steps.

201. A terminal device reads an access point account and an accesspassword bound to the access point account that are stored in anexternal NFC tag.

In this embodiment of the present invention, a user may hold theterminal device to approach the external NFC tag, so that the terminaldevice may read, by using an NCF module of the terminal device, theaccess point account and the access password bound to the access pointaccount that are stored in the external NFC tag.

In this embodiment of the present invention, the NFC tag may store onlyone access point account and an access password bound to the accesspoint account, or the NFC tag may store multiple access point accountsand access passwords bound to the multiple access point accounts, whichis not limited in this embodiment of the present invention.

In this embodiment of the present invention, the access point accountmay include an access point name (for example, TP-LINK1), an accesspoint identifier, and the like.

In this embodiment of the present invention, the access point accountmay be a WIFI access point account or may be a Bluetooth access pointaccount. Specially, when the NFC tag stores multiple access pointaccounts and access passwords bound to the multiple access pointaccounts, the multiple access point accounts stored in the NFC tag mayinclude only WIFI access point accounts, or may include only Bluetoothaccess point accounts, or may include some WIFI access point accountsand some Bluetooth access point accounts.

202. The terminal device acquires one target access point accountaccording to the read access point account, and establishes, accordingto the target access point account and an access password bound to thetarget access point account, a wireless connection to an access point towhich the target access point account belongs.

In this embodiment of the present invention, when the NFC tag includesonly one access point account and an access password bound to the accesspoint account, the terminal device may use the read access point accountas the target access point account.

In this embodiment of the present invention, when the NFC tag includesmultiple access point accounts and access passwords bound to themultiple access point accounts, the terminal device may select anyaccess point account from the read access point accounts as the targetaccess point account. Alternatively, the terminal device may detect asignal strength value of an access point to which each of the readaccess point accounts belongs, and select an access point account of anaccess point whose signal strength value is the largest as the targetaccess point account. Alternatively, the terminal device may detect asignal strength value of an access point to which each of the readaccess point accounts belongs and output each of the read access pointaccounts and the detected signal strength value of the access point towhich the access point account belongs, and may detect any access pointaccount that is selected by the user according to the signal strengthvalue from the access point accounts output by the terminal device anduse the access point account as the target access point account.

In this embodiment of the present invention, in step 202, that theterminal device establishes, according to the target access pointaccount and the access password bound to the target access pointaccount, the wireless connection to the access point to which the targetaccess point account belongs may be implemented by performing thefollowing steps.

Step (A1): The terminal device sends, according to the target accesspoint account, a wireless connection request to the access point towhich the target access point account belongs, where the wirelessconnection request includes the access password bound to the targetaccess point account.

Step (B1): The terminal device receives a wireless connection successresponse that is sent after the access point to which the target accesspoint account belongs verifies that the access password bound to thetarget access point account is correct.

In this embodiment of the present invention, when the target accesspoint account is a WIFI access point account, the terminal device mayenable a WIFI module (if the WIFI module has been enabled, the WIFImodule does not need to be enabled again) to send the wirelessconnection request to the access point to which the target access pointaccount belongs, where the wireless connection request includes theaccess password bound to the target access point account.

In this embodiment of the present invention, when the target accesspoint account is a Bluetooth access point account, the terminal devicemay enable a Bluetooth module (if the Bluetooth module has been enabled,the Bluetooth module does not need to be enabled again) to send thewireless connection request to the access point to which the targetaccess point account belongs, where the wireless connection requestincludes the access password bound to the target access point account.

In this embodiment of the present invention, the access point to whichthe target access point account belongs may verify whether the accesspassword bound to the target access point account is the same as alocally set access password; and if the access password bound to thetarget access point account is the same as the locally set accesspassword, verify that the access password bound to the target accesspoint account is correct, and in this case, the access point to whichthe target access point account belongs may send a wireless connectionsuccess response to the terminal device; or if the access password boundto the target access point account is different from the locally setaccess password, verify that the access password bound to the targetaccess point account is wrong, and in this case, the access point towhich the target access point account belongs may send a wirelessconnection failure response to the terminal device.

In this embodiment of the present invention, when the target accesspoint account is a WIFI access point account, the terminal device mayreceive, by using the WIFI module, the wireless connection successresponse that is sent after the access point to which the target accesspoint account belongs verifies that the access password bound to thetarget access point account is correct.

In this embodiment of the present invention, when the target accesspoint account is a Bluetooth access point account, the terminal devicemay receive, by using the Bluetooth module, the wireless connectionsuccess response that is sent after the access point to which the targetaccess point account belongs verifies that the access password bound tothe target access point account is correct.

In this embodiment of the present invention, in step 202, that theterminal device establishes, according to the target access pointaccount and the access password bound to the target access pointaccount, the wireless connection to the access point to which the targetaccess point account belongs may also be implemented by performing thefollowing steps:

Step (A2): The terminal device sends, according to the target accesspoint account, a wireless connection request to the access point towhich the target access point account belongs.

Step (B2): The terminal device receives prompt information sent by theaccess point to which the target access point account belongs, where theprompt information is used to prompt sending of the access passwordbound to the target access point account.

Step (C2): The terminal device sends the access password bound to thetarget access point account to the access point to which the targetaccess point account belongs.

Step (D4): The terminal device receives a wireless connection successresponse that is sent after the access point to which the target accesspoint account belongs verifies that the access password bound to thetarget access point account is correct.

Based on the foregoing step 201, after the terminal device acquires onetarget access point account according to the read access point account,the present invention may also be implemented with reference to theforegoing steps (A2) to (D4), which is not limited in this embodiment ofthe present invention. When the present invention is implemented withreference to the foregoing steps (A2) to (D4), an existing wirelessaccess process may be used.

In the method described in FIG. 2, operations such as manually enablingaccess point search and manually entering a password by a user can beavoided, so that efficiency in accessing an access point can beeffectively improved.

Referring to FIG. 3, FIG. 3 is a schematic flowchart of another wirelessaccess method according to an embodiment of the present invention. Inthe wireless access method shown in FIG. 3, it is assumed that anexternal NFC tag stores only one piece of WIFI access point information,where the WIFI access point information includes a WIFI access pointaccount and an access password bound to the WIFI access point account. Awireless access process is the same when the NFC tag stores only onepiece of Bluetooth access point information (including a Bluetoothaccess point account and an access password bound to the Bluetoothaccess point account), which is not repeated in this embodiment of thepresent invention.

In the wireless access method shown in FIG. 3, one WIFI access pointaccount and an access password bound to the WIFI access point accountmay be written into the external NFC tag in advance, and the NFC tag maybe attached at a fixed location.

In this embodiment of the present invention, a management user of a WIFIaccess point may write one WIFI access point account and an accesspassword bound to the WIFI access point account into the external NFCtag. For example, the management user of the WIFI access point mayaccess an NFC application of a smartphone, and after manually enteringone WIFI access point account and an access password bound to the WIFIaccess point account into the NFC application, make the smartphoneapproach the external NFC tag, so as to write the one WIFI access pointaccount and the access password bound to the WIFI access point accountinto the external NFC tag. Alternatively, the management user of theWIFI access point may access an NFC application of a smartphone, call,from the NFC application, one WIFI access point account and an accesspassword bound to the WIFI access point account that have been stored inthe smartphone, and then make the smartphone approach the external NFCtag, so as to write the one WIFI access point account and the accesspassword bound to the WIFI access point account into the external NFCtag.

For example, the NFC tag may be attached at a fixed location in publicplaces such as an airport, a mall, and a station, or the NFC tag may beattached at a fixed location in a house.

As shown in FIG. 3, the wireless access method may include the followingsteps:

301. Enable an NFC module of a terminal device.

302. Hold the terminal device to approach an external NFC tag, so thatthe terminal device reads one WIFI access point account and an accesspassword bound to the WIFI access point account that are stored in theexternal NFC tag.

In this embodiment of the present invention, a user may hold theterminal device to approach the external NFC tag, so that the terminaldevice may read, by using the NCF module of the terminal device, the oneWIFI access point account and the access password bound to the WIFIaccess point account that are stored in the external NFC tag.

303. The terminal device stores the one WIFI access point account andthe access password bound to the WIFI access point account that areread.

304. The terminal device uses the read one WIFI access point account asa target access point account, and sends, according to the target accesspoint account, a wireless connection request to a WIFI access point towhich the target access point account belongs, where the wirelessconnection request includes an access password bound to the targetaccess point account.

In this embodiment of the present invention, the terminal device maysend, by using a WIFI module, the wireless connection request to theWIFI access point to which the target access point account belongs,where the wireless connection request includes the access password boundto the target access point account.

305. The terminal device receives a wireless connection success responsethat is sent after the WIFI access point to which the target accesspoint account belongs verifies that the access password bound to thetarget access point account is correct, and successfully connects to theWIFI access point.

306. The terminal device determines whether a storage time of the WIFIaccess point account and the access password bound to the WIFI accesspoint account exceeds a preset threshold (for example, two hours); andif the storage time exceeds the preset threshold, deletes the WIFIaccess point account and the access password bound to the WIFI accesspoint account that are stored.

If the storage time does not exceed the preset threshold, the terminaldevice does not need to delete the WIFI access point account and theaccess password bound to the WIFI access point account that are stored.

In an implementation manner, alternatively, the terminal device maydetect whether a wireless disconnection instruction entered by the useris received; and if the wireless disconnection instruction entered bythe user is received, delete the WIFI access point account and theaccess password bound to the WIFI access point account that are stored;or if the wireless disconnection instruction entered by the user is notreceived, does not need to delete the WIFI access point account and theaccess password bound to the WIFI access point account that are stored.

In the method described in FIG. 3, a terminal device can not onlycomplete automatic access to a WIFI access point, but also avoidoperations of manually enabling access point search and manuallyentering a password by a user, so that efficiency in accessing the WIFIaccess point can be effectively improved.

Referring to FIG. 4, FIG. 4 is a schematic flowchart of another wirelessaccess method according to an embodiment of the present invention. Inthe wireless access method shown in FIG. 4, it is assumed that an NFCtag stores only multiple pieces of WIFI access point information, whereeach piece of WIFI access point information includes a WIFI access pointaccount and an access password bound to the WIFI access point account. Awireless access process is the same when the NFC tag stores multiplepieces of Bluetooth access point information (that is, each piece ofBluetooth access point information includes a Bluetooth access pointaccount and an access password bound to the Bluetooth access pointaccount) or when the NFC tag stores some pieces of Bluetooth accesspoint information and some pieces of WIFI access point information,which is not repeated in this embodiment of the present invention.

In the wireless access method shown in FIG. 4, multiple WIFI accesspoint accounts and access passwords bound to the multiple WIFI accesspoint accounts may be written into an external NFC tag in advance, andthe NFC tag may be attached at a fixed location.

In this embodiment of the present invention, a management user of a WIFIaccess point may write multiple WIFI access point accounts and accesspasswords bound to the multiple WIFI access point accounts into theexternal NFC tag. For example, the management user of the WIFI accesspoint may access an NFC application of a smartphone, and after manuallyentering multiple WIFI access point accounts and access passwords boundto the multiple WIFI access point accounts into the NFC application,make the smartphone approach the external NFC tag, so as to write themultiple WIFI access point accounts and the access passwords bound tothe multiple WIFI access point accounts into the external NFC tag.Alternatively, the management user of the WIFI access point may accessan NFC application of a smartphone, call, from the NFC application,multiple WIFI access point accounts and access passwords bound to themultiple WIFI access point accounts that have been stored in thesmartphone, and then make the smartphone approach the external NFC tag,so as to write the multiple WIFI access point accounts and the accesspasswords bound to the multiple WIFI access point accounts into theexternal NFC tag.

For example, the NFC tag may be attached at a fixed location in publicplaces such as an airport, a mall, and a station, or the NFC tag may beattached at a fixed location (for example, a wall) in a house.

As shown in FIG. 4, the wireless access method may include the followingsteps:

401. Enable an NFC module of a terminal device.

402. Hold the terminal device to approach an external NFC tag, so thatthe terminal device reads multiple WIFI access point accounts and accesspasswords bound to the multiple WIFI access point accounts that arestored in the external NFC tag.

In this embodiment of the present invention, a user may hold theterminal device to approach the external NFC tag, so that the terminaldevice may read, by using the NCF module of the terminal device, themultiple WIFI access point accounts and the access passwords bound tothe multiple WIFI access point accounts that are stored in the externalNFC tag.

403. The terminal device stores the multiple WIFI access point accountsand the access passwords bound to the multiple WIFI access pointaccounts that are read.

404. The terminal device detects a signal strength value of a WIFIaccess point to which each of the read WIFI access point accountsbelongs.

The signal strength value of the WIFI access point is generallyrepresented in units of dB.

405. The terminal device selects a WIFI access point account of a WIFIaccess point whose signal strength value is the largest as a targetaccess point account, and sends, according to the target access pointaccount, a wireless connection request to the WIFI access point to whichthe target access point account belongs, where the wireless connectionrequest includes an access password bound to the target access pointaccount.

For example, it is assumed that in step 404, the terminal device detectsthat a signal strength value of a WIFI access point to which a WIFIaccess point account TP-LINK1 belongs is −70 dB, a signal strength valueof a WIFI access point to which a WIFI access point account TP-LINK2belongs is −60 dB, and a signal strength value of a WIFI access point towhich a WIFI access point account TP-LINK3 belongs is −50 dB; in step405, the terminal device may select the WIFI access point accountTP-LINK1 of the WIFI access point whose signal strength value is thelargest as the target access point account.

In this embodiment of the present invention, by performing step 404 andstep 405, the terminal device can automatically select, in thebackground, the WIFI access point account of the WIFI access point whosesignal strength value is the largest as the target access point account.

In this embodiment of the present invention, the terminal device maysend, by using a WIFI module, the wireless connection request to theWIFI access point to which the target access point account belongs,where the wireless connection request includes the access password boundto the target access point account.

406. The terminal device receives a wireless connection success responsethat is sent after the WIFI access point to which the target accesspoint account belongs verifies that the access password bound to thetarget access point account is correct, and successfully connects to theWIFI access point.

407. The terminal device determines whether a storage time of the WIFIaccess point accounts and the access passwords bound to the WIFI accesspoint accounts exceeds a preset threshold (for example, two hours); andif the storage time exceeds the preset threshold, deletes the WIFIaccess point accounts and the access passwords bound to the WIFI accesspoint accounts that are stored.

If the storage time does not exceed the preset threshold, the terminaldevice does not need to delete the WIFI access point accounts and theaccess passwords bound to the WIFI access point accounts that arestored.

In an implementation manner, alternatively, the terminal device maydetect whether a wireless disconnection instruction entered by the useris received; and if the wireless disconnection instruction entered bythe user is received, delete the WIFI access point accounts and theaccess passwords bound to the WIFI access point accounts that arestored; or if the wireless disconnection instruction entered by the useris not received, does not need to delete the WIFI access point accountsand the access passwords bound to the WIFI access point accounts thatare stored.

In the method described in FIG. 4, a terminal device can not onlycomplete automatic access to a WIFI access point, but also avoidoperations of manually enabling access point search and manuallyentering a password by a user, so that efficiency in accessing the WIFIaccess point can be effectively improved.

Referring to FIG. 5, FIG. 5 is a schematic flowchart of another wirelessaccess method according to an embodiment of the present invention. Inthe wireless access method shown in FIG. 5, it is assumed that an NFCtag stores only multiple pieces of WIFI access point information, whereeach piece of WIFI access point information includes a WIFI access pointaccount and an access password bound to the WIFI access point account. Awireless access process is the same when the NFC tag stores multiplepieces of Bluetooth access point information (that is, each piece ofBluetooth access point information includes a Bluetooth access pointaccount and an access password bound to the Bluetooth access pointaccount) or when the NFC tag stores some pieces of Bluetooth accesspoint information and some pieces of WIFI access point information,which is not repeated in this embodiment of the present invention.

In the wireless access method shown in FIG. 5, multiple WIFI accesspoint accounts and access passwords bound to the multiple WIFI accesspoint accounts may be written into an external NFC tag in advance, andthe NFC tag may be attached at a fixed location.

As shown in FIG. 5, the wireless access method may include the followingsteps.

501. Enable an NFC module of a terminal device.

502. Hold the terminal device to approach an external NFC tag, so thatthe terminal device reads multiple WIFI access point accounts and accesspasswords bound to the multiple WIFI access point accounts that arestored in the external NFC tag.

In this embodiment of the present invention, a user may hold theterminal device to approach the external NFC tag, so that the terminaldevice may read, by using the NCF module of the terminal device, themultiple WIFI access point accounts and the access passwords bound tothe multiple WIFI access point accounts that are stored in the externalNFC tag.

503. The terminal device stores the multiple WIFI access point accountsand the access passwords bound to the multiple WIFI access pointaccounts that are read.

504. The terminal device detects a signal strength value of a WIFIaccess point to which each of the read WIFI access point accountsbelongs.

505. The terminal device outputs each of the read WIFI access pointaccounts and the signal strength value of the WIFI access point to whichthe WIFI access point account belongs.

506. The terminal device detects any WIFI access point account that isselected by a user according to the signal strength value from theoutput WIFI access point accounts, uses the WIFI access point account asa target access point account, and sends, according to the target accesspoint account, a wireless connection request to a WIFI access point towhich the target access point account belongs, where the wirelessconnection request includes an access password bound to the targetaccess point account.

For example, it is assumed that in step 504, the terminal device detectsthat a signal strength value of a WIFI access point to which a WIFIaccess point account TP-LINK1 belongs is −70 dB, a signal strength valueof a WIFI access point to which a WIFI access point account TP-LINK2belongs is −60 dB, and a signal strength value of a WIFI access point towhich a WIFI access point account TP-LINK3 belongs is −50 dB; in step505, the terminal device may output each of the WIFI access pointaccounts and a signal strength value of a WIFI access point to which theWIFI access point account belongs, as shown in FIG. 6. Correspondingly,in step 506, the terminal device may detect any WIFI access pointaccount that is selected by the user according to the signal strengthvalue shown in FIG. 6 from the WIFI access point accounts output by theterminal device, and use the WIFI access point account as the targetaccess point account. For example, the terminal device may detect theWIFI access point account TP-LINK2 that is selected by the useraccording to the signal strength value −60 dB shown in FIG. 6 from theWIFI access point accounts output by the terminal device, and use theWIFI access point account TP-LINK2 as the target access point account.

In this embodiment of the present invention, by performing steps 504 to506, the user can select a desirable WIFI access point account as thetarget access point account.

In an embodiment, alternatively, the user may not consider a selectionbasis of a signal strength value, and may select any WIFI access pointaccount from the WIFI access point accounts output by the terminaldevice. Correspondingly, in step 506, the terminal device may detect anyWIFI access point account that is selected by the user from the WIFIaccess point accounts output by the terminal device, and use the WIFIaccess point account as the target access point account.

In this embodiment of the present invention, a purpose of outputting, bythe terminal device, the signal strength value of the WIFI access pointto which the WIFI access point account belongs is to provide a selectionbasis for the user to select a WIFI access point account. Certainly, theuser may ignore such a selection basis and may directly select any WIFIaccess point account (that is, a WIFI access point name).

In this embodiment of the present invention, the terminal device maysend, by using a WIFI module, the wireless connection request to theWIFI access point to which the target access point account belongs,where the wireless connection request includes the access password boundto the target access point account.

507. The terminal device receives a wireless connection success responsethat is sent after the WIFI access point to which the target accesspoint account belongs verifies that the access password bound to thetarget access point account is correct, and successfully connects to theWIFI access point.

508. The terminal device determines whether a storage time of the WIFIaccess point accounts and the access passwords bound to the WIFI accesspoint accounts exceeds a preset threshold (for example, two hours); andif the storage time exceeds the preset threshold, deletes the WIFIaccess point accounts and the access passwords bound to the WIFI accesspoint accounts that are stored.

In an implementation manner, alternatively, the terminal device maydetect whether a wireless disconnection instruction entered by the useris received; and if the wireless disconnection instruction entered bythe user is received, delete the WIFI access point accounts and theaccess passwords bound to the WIFI access point accounts that arestored.

In the method described in FIG. 5, a terminal device can not onlycomplete automatic access to a WIFI access point, but also avoidoperations of manually enabling access point search and manuallyentering a password by a user, so that efficiency in accessing the WIFIaccess point can be effectively improved.

Referring to FIG. 7, FIG. 7 is a schematic flowchart of another wirelessaccess method according to an embodiment of the present invention. Inthe wireless access method shown in FIG. 7, it is assumed that an NFCtag stores only multiple pieces of WIFI access point information, whereeach piece of WIFI access point information includes only a WIFI accesspoint account. In the wireless access method shown in FIG. 7, multipleWIFI access point accounts may be written into an external NFC tag inadvance, and the NFC tag may be attached at a fixed location.

As shown in FIG. 7, the wireless access method may include the followingsteps:

701. Enable an external NFC module of a terminal device.

702. Hold the terminal device to approach an external NFC tag, so thatthe terminal device reads multiple WIFI access point accounts stored inthe external NFC tag.

In this embodiment of the present invention, a user may hold theterminal device to approach the external NFC tag, so that the terminaldevice may read, by using the NCF module of the terminal device, themultiple WIFI access point accounts stored in the external NFC tag.

703. The terminal device stores the multiple read WIFI access pointaccounts.

704. The terminal device detects a signal strength value of a WIFIaccess point to which each of the read WIFI access point accountsbelongs.

705. The terminal device outputs each of the read WIFI access pointaccounts and the signal strength value of the WIFI access point to whicheach of the read WIFI access point accounts belongs.

706. The terminal device detects any WIFI access point account that isselected by a user according to the signal strength value from theoutput WIFI access point accounts, uses the WIFI access point account asa target access point account, and sends, according to the target accesspoint account, a wireless connection request to a WIFI access point towhich the target access point account belongs.

In this embodiment of the present invention, by performing steps 704 to706, the user can select a desirable WIFI access point account as thetarget access point account.

In an embodiment, alternatively, the user may not consider a selectionbasis of a signal strength value, and may select any WIFI access pointaccount from the WIFI access point accounts output by the terminaldevice. Correspondingly, in step 706, the terminal device may detect anyWIFI access point account that is selected by the user from the WIFIaccess point accounts output by the terminal device, and use the WIFIaccess point account as the target access point account.

In this embodiment of the present invention, the terminal device maysend, by using a WIFI module, the wireless connection request to theWIFI access point to which the target access point account belongs,where the wireless connection request includes an access password boundto the target access point account.

707. The terminal device receives a wireless connection success responsethat is sent after the WIFI access point to which the target accesspoint account belongs verifies a target access point, and successfullyconnects to the WIFI access point.

708. The terminal device determines whether a storage time of the WIFIaccess point accounts exceeds a preset threshold (for example, twohours); and if the storage time exceeds the preset threshold, deletesthe WIFI access point accounts and access passwords bound to the WIFIaccess point accounts that are stored.

In an implementation manner, alternatively, the terminal device maydetect whether a wireless disconnection instruction entered by the useris received; and if the wireless disconnection instruction entered bythe user is received, delete the stored WIFI access point accounts.

In the method described in FIG. 7, a terminal device can not onlycomplete automatic access to a WIFI access point, but also avoidoperations of manually enabling access point search and manuallyentering a password by a user, so that efficiency in accessing the WIFIaccess point can be effectively improved.

Referring to FIG. 8, FIG. 8 is a schematic structural diagram of aterminal device according to an embodiment of the present invention. Asshown in FIG. 8, the terminal device may include: a reading module 801,configured to read access point information stored in an external NFCtag; a main control module 802, configured to: acquire one piece oftarget access point information according to the access pointinformation read by the reading module 801, and output the one piece oftarget access point information to a radio frequency module 803; and theradio frequency module 803, configured to establish, according to thetarget access point information output by the main control module 802, awireless connection to an access point to which the target access pointinformation belongs.

In this embodiment of the present invention, in physical implementation,the reading module 801 may be implemented by an NFC module; in physicalimplementation, the main control module 802 may be implemented byhardware such as a processor or a CPU; and in physical implementation,the radio frequency module 803 may be implemented by hardware such as acommunication unit.

In this embodiment of the present invention, the terminal devicedescribed in FIG. 8 can not only complete automatic access to an accesspoint, but also avoid operations of manually enabling access pointsearch and manually entering a password by a user, so that efficiency inaccessing the access point can be effectively improved.

Referring to FIG. 9 together, FIG. 9 is a schematic structural diagramof another terminal device according to an embodiment of the presentinvention. The terminal device shown in FIG. 9 is obtained by optimizingthe terminal device shown in FIG. 8. Compared with the terminal deviceshown in FIG. 8, the terminal device shown in FIG. 9 may furtherinclude: a storage module 804, configured to store the access pointinformation read by the reading module 801.

In physical implementation, the storage module 804 may be implemented byvarious storage mediums.

In an optional implementation manner, the terminal device shown in FIG.9 may further include: a processing module 805, configured to: determinewhether a storage time for storing the access point information by thestorage module 804 exceeds a preset threshold; and if the storage timeexceeds the preset threshold, enable a first control module 806; and thefirst control module 806, configured to delete the access pointinformation stored by the storage module 805.

That is, after the processing module 805 is enabled, the first controlmodule 806 may delete the access point information stored by the storagemodule 805. However, when the processing module 805 determines that thestorage time for storing the access point information by the storagemodule 804 does not exceed the preset threshold, the processing module805 does not need to enable the first control module 806, and the firstcontrol module 806 does not need to delete the access point informationstored by the storage module 805 either.

In this embodiment of the present invention, in physical implementation,both the processing module 805 and the first control module 806 may beimplemented by hardware such as a processor or a CPU.

In another optional implementation manner, the terminal device shown inFIG. 9 may further include: a third detection module 807, configured to:detect whether a wireless disconnection instruction entered by the useris received; and if the wireless disconnection instruction entered bythe user is received, enable a second control module 808; and the secondcontrol module 808, configured to delete the access point informationstored by the storage module 805.

That is, after the third detection module 807 is enabled, the secondcontrol module 808 may delete the access point information stored by thestorage module 805. However, when the third detection module 807 detectsthat the wireless disconnection instruction entered by the user is notreceived, the third detection module 807 does not need to enable thesecond control module 808, and the second control module 808 does notneed to delete the access point information stored by the storage module805 either.

In this embodiment of the present invention, in physical implementation,the third detection module 807 may be implemented by hardware such as adetector or a sensor, and in physical implementation, the second controlmodule 808 may be implemented by hardware such as a processor or a CPU.

It should be noted that among the foregoing processing module 805, firstcontrol module 806, third detection module 807, and second controlmodule 808, only the processing module 805 and the first control module806 may exist, or only the third detection module 807 and the secondcontrol module 808 may exist, or the processing module 805, the firstcontrol module 806, the third detection module 807, and the secondcontrol module 808 may coexist, which is not limited in this embodimentof the present invention.

Referring to FIG. 10 together, FIG. 10 is a schematic structural diagramof another terminal device according to an embodiment of the presentinvention. The terminal device shown in FIG. 10 is obtained byoptimizing the terminal device shown in FIG. 9. Compared with theterminal device shown in FIG. 9, in the terminal device shown in FIG.10, the main control module 802 includes: a detection unit 8021,configured to: detect a signal strength value of an access point towhich each piece of the access point information read by the readingmodule 801 belongs, and output the signal strength value to a selectionunit 8022; and the selection unit 8022, configured to: select, from theaccess point information read by the reading module 801 and according tothe signal strength value that is of the access point to which eachpiece of the access point information belongs and that is output by thedetection unit 8021, access point information of an access point whosesignal strength value is the largest as the target access pointinformation, and output the target access point information to the radiofrequency module 803.

By using the detection unit 8021 and the selection unit 8022, theterminal device can automatically select, in the background, the accesspoint information of the access point whose signal strength value is thelargest as the target access point information.

In this embodiment of the present invention, the detection unit 8021 maybe implemented by hardware such as a detector, and the selection unit8022 may be implemented by hardware such as a processor or a CPU.

Referring to FIG. 11 together, FIG. 11 is a schematic structural diagramof another terminal device according to an embodiment of the presentinvention. The terminal device shown in FIG. 11 is obtained byoptimizing the terminal device shown in FIG. 9. Compared with theterminal device shown in FIG. 9, in the terminal device shown in FIG.11, the main control module 802 includes: a first detection unit 8023,configured to: detect a signal strength value of an access point towhich each piece of the access point information read by the readingmodule 801 belongs, and output the signal strength value to an input/outunit 8024; the input/output unit 8024, configured to output each pieceof the access point information read by the reading module 801 and thesignal strength value that is of the access point to which the accesspoint information belongs and that is detected by the first detectionunit 8023; and a second detection unit 8025, configured to: detect onepiece of target access point information that is selected by a useraccording to the signal strength value from the access point informationoutput by the input/output unit 8024, and output the one piece of targetaccess point information to the radio frequency module 803.

By using the first detection unit 8023, the input/output unit 8024, andthe second detection unit 8025, the user can select desirable accesspoint information as a target access point account.

In this embodiment of the present invention, the first detection unit8023 may be implemented by hardware such as a detector, the input/outputunit 8024 may be implemented by hardware such as a touchscreen, and thesecond detection unit 8025 may also be implemented by hardware such as adetector.

In this embodiment of the present invention, the foregoing access pointinformation may be one or more pieces of WIFI access point informationand Bluetooth access point information. The access point information mayinclude only an access point account, or include an access point accountand an access password bound to the access point account, which is notlimited in this embodiment of the present invention.

In this embodiment of the present invention, when the access pointinformation includes only an access point account, the foregoing radiofrequency module 803 may send, according to a target access pointaccount output by the main control module 802, a wireless connectionrequest to an access point to which the target access point accountbelongs; and receive a wireless connection success response sent by theaccess point to which the target access point account belongs, so as toimplement a wireless connection between the terminal device and theaccess point to which the target access point account belongs.

Referring to FIG. 12 together, FIG. 12 is a schematic structural diagramof another terminal device according to an embodiment of the presentinvention. The terminal device shown in FIG. 12 is obtained byoptimizing the terminal device shown in FIG. 9. In the terminal deviceshown in FIG. 12, if the access point information includes an accesspoint account and an access password bound to the access point account,the radio frequency module 803 may include: a reading unit 8031,configured to: read, from the reading module 801 according to a targetaccess point account output by the main control module 802, an accesspassword bound to the target access point account, and output the accesspassword to a communication unit 8032; and the communication unit 8032,configured to: send, according to a target access point account outputby the main control module 802, a wireless connection request to anaccess point to which the target access point account belongs, where thewireless connection request includes the access password that is boundto the target access point account and that is output by the readingunit 8031; and receive a wireless connection success response that issent after the access point to which the target access point accountbelongs verifies that the access password bound to the target accesspoint account is correct, so as to implement a wireless connectionbetween the terminal device and the access point to which the targetaccess point account belongs.

In the terminal device shown in FIG. 12, the reading unit 8031 may beimplemented by hardware such as a processor or a CPU, and thecommunication unit 8032 may be implemented by hardware such as anexisting communication unit or communication module.

It should be noted that, a structure and a function of the main controlmodule 802 in the terminal device shown in FIG. 12 may be the same as astructure and a function of the main control module 802 in the terminaldevice shown in FIG. 10 or FIG. 11, which is not repeated in thisembodiment of the present invention.

Referring to FIG. 13 together, FIG. 13 is a schematic structural diagramof another terminal device according to an embodiment of the presentinvention. The terminal device shown in FIG. 13 is obtained byoptimizing the terminal device shown in FIG. 9. In the terminal deviceshown in FIG. 13, if the access point information includes an accesspoint account and an access password bound to the access point account,the radio frequency module 803 may include: a communication unit 8033,configured to: send, according to a target access point account outputby the main control module 802, a wireless connection request to anaccess point to which the target access point account belongs; receiveprompt information sent by the access point to which the target accesspoint account belongs; and enable a reading unit 8034, where the promptinformation is used to prompt sending of the access password bound tothe target access point account; and the reading unit 8034, configuredto: read, from the reading module 801 according to the target accesspoint account output by the main control module 802, the access passwordbound to the target access point account, and output the access passwordto the communication unit 8033; where the communication unit 8033 isfurther configured to: send the access password bound to the targetaccess point account to the access point to which the target accesspoint account belongs; and receive a wireless connection successresponse that is sent after the access point to which the target accesspoint account belongs verifies that the access password bound to thetarget access point account is correct, so as to implement a wirelessconnection between the terminal device and the access point to which thetarget access point account belongs.

In the terminal device shown in FIG. 13, the reading unit 8034 may beimplemented by hardware such as a processor or a CPU, and thecommunication unit 8033 may be implemented by hardware such as anexisting communication unit or communication module.

It should be noted that, a structure and a function of the main controlmodule 802 in the terminal device shown in FIG. 13 may be the same as astructure and a function of the main control module 802 in the terminaldevice shown in FIG. 10 or FIG. 11, which is not repeated in thisembodiment of the present invention.

In the terminal device described in FIG. 8 to FIG. 13, the terminaldevice can not only complete automatic access to an access point, butalso avoid operations of manually enabling access point search andmanually entering a password by a user, so that efficiency in accessingthe access point can be effectively improved.

Referring to FIG. 14, FIG. 14 is a schematic structural diagram ofanother terminal device according to an embodiment of the presentinvention. The terminal device shown in FIG. 14 may include: a processor1; an NFC module 3 and an input/output module 4 that are connected tothe processor 1 by using an interface 2; a memory 6 that is connected tothe processor 1 by using a bus 5; a coupler 8 that is connected to theprocessor 1 by using multiple network interfaces 7; and an antennamodule 9 that is connected to the coupler 8. The multiple networkinterfaces 7 may include several different interfaces such as a WIFIinterface, a Bluetooth interface, a 2G network interface, a 3G networkinterface, and a 4G network interface, which is not limited in thisembodiment of the present invention. In an uplink process, output of thenetwork interface 7 is coupled by the coupler 8 to the antenna module 9for transmission, and the uplink process and a downlink process arereversible. The memory 6 is configured to store a group of program code,and the processor 1 is configured to invoke the program code stored inthe memory 6, so as to execute the following operations: controlling theNFC module 3 to read access point information stored in an external NFCtag; and acquiring one piece of target access point informationaccording to the read access point information, and establishing,according to the target access point information, a wireless connectionbetween the antenna module 9 and an access point to which the targetaccess point information belongs.

In an optional implementation manner, a manner in which the processor 1acquires the one piece of target access point information according tothe read access point information may be: controlling the antenna moduleto detect a signal of an access point to which each piece of the readaccess point information belongs; calculating a signal strength valuethat is of the access point to which each piece of the access pointinformation belongs and that is detected by the antenna module 9; andselecting access point information of an access point whose signalstrength value is the largest as the target access point information.

In another optional implementation manner, a manner in which theprocessor 1 acquires the one piece of target access point informationaccording to the read access point information may be: controlling theantenna module 9 to detect a signal of an access point to which eachpiece of the read access point information belongs; calculating a signalstrength value that is of the access point to which each piece of theaccess point information belongs and that is detected by the antennamodule 9; controlling the input/output module 4 to output each piece ofthe access point information and the signal strength value that is ofthe access point to which the access point information belongs and thatis obtained by means of calculation; and controlling the input/outputmodule 4 to detect any piece of access point information that isselected by a user according to the signal strength value from theaccess point information output by the input/output module 4, and usethe piece of access point information as the target access pointinformation.

In another optional implementation manner, the foregoing access pointinformation includes an access point account. Correspondingly, a mannerin which the processor 1 establishes, according to the target accesspoint information, the wireless connection between the antenna module 9and the access point to which the target access point informationbelongs may be specifically: controlling the antenna module 9 to send,according to a target access point account, a wireless connectionrequest to an access point to which the target access point accountbelongs, so that the antenna module 9 receives a wireless connectionsuccess response sent by the access point to which the target accesspoint account belongs.

In another optional implementation manner, the foregoing access pointinformation includes an access point account and an access passwordbound to the access point account. Correspondingly, a manner in whichthe processor 1 establishes, according to the target access pointinformation, the wireless connection between the antenna module 9 andthe access point to which the target access point information belongsmay be specifically: controlling the antenna module 9 to send, accordingto a target access point account, a wireless connection request to anaccess point to which the target access point account belongs, where thewireless connection request includes an access password bound to thetarget access point account, so that the antenna module 9 receives awireless connection success response that is sent after the access pointto which the target access point account belongs verifies that theaccess password bound to the target access point account is correct.

In another optional implementation manner, when the foregoing accesspoint information includes an access point account and an accesspassword bound to the access point account, a manner in which theprocessor 1 establishes, according to the target access pointinformation, the wireless connection between the antenna module 9 andthe access point to which the target access point information belongsmay be specifically: controlling the antenna module 9 to send, accordingto a target access point account, a wireless connection request to anaccess point to which the target access point account belongs, so thatthe antenna module 9 receives prompt information sent by the accesspoint to which the target access point account belongs, where the promptinformation is used to prompt sending of an access password bound to thetarget access point account, and so that the antenna module 9 sends theaccess password bound to the target access point account to the accesspoint to which the target access point account belongs and receives awireless connection success response that is sent after the access pointto which the target access point account belongs verifies that theaccess password bound to the target access point account is correct.

In an optional implementation manner, the processor 1 further executesthe following operation: controlling the memory 6 to store the readaccess point information.

In an optional implementation manner, the processor 1 further executesthe following operations: determining whether a storage time of theaccess point information stored by the memory 6 exceeds a presetthreshold; and if the storage time exceeds the preset threshold,controlling the memory 6 to delete the stored access point information.

In an optional implementation manner, the processor 1 further executesthe following operations: detecting whether the input/output module 4receives a wireless disconnection instruction entered by the user; andif the input/output module 4 receives the wireless disconnectioninstruction entered by the user, controlling the memory 6 to delete thestored access point information.

In this embodiment of the present invention, the foregoing access pointinformation includes one or more pieces of WIFI access point informationand Bluetooth access point information.

It should be noted that only components in the terminal device that arerequired for implementing the wireless access method disclosed in theembodiments of the present invention are marked in the terminal deviceshown in FIG. 14. Other components such as a physical key, a keyboard, apower supply, and a housing that the terminal device can have are notmarked in this embodiment of the present invention because this does notaffect implementation of the embodiments of the present invention.

In the terminal device described in FIG. 14, the terminal device can notonly complete automatic access to an access point, but also avoidoperations of manually enabling access point search and manuallyentering a password by a user, so that efficiency in accessing theaccess point can be effectively improved.

Referring to FIG. 15, FIG. 15 is a schematic network diagram of awireless access system according to an embodiment of the presentinvention. The wireless access system shown in FIG. 15 may include: aterminal device 1502, an NFC tag 1501 and an access point 1503 to whichtarget access point information belongs that are independent of theterminal device 1502.

The NFC tag 1501 is configured to store access point information.

The terminal device 1502 is configured to: read the access pointinformation stored in the NFC tag 1501, acquire one piece of the targetaccess point information according to the read access point information,and establish, according to the target access point information, awireless connection to the access point 1503 to which the target accesspoint information belongs.

In an implementation manner, a manner in which the terminal device 1502acquires the one piece of target access point information according tothe read access point account may be as follows: the terminal device1502 is configured to: detect a signal strength value of an access pointto which each piece of the read access point information belongs, andselect access point information of an access point whose signal strengthvalue is the largest as a target access point account.

In this manner, the terminal device 1502 can automatically select, inthe background, the access point information of the access point whosesignal strength value is the largest as the target access pointinformation.

In another implementation manner, a manner in which the terminal device1502 acquires one piece of the target access point account according tothe read access point account may be as follows: the terminal device1502 is configured to: detect a signal strength value of an access pointto which each piece of the read access point information belongs, andoutput each piece of the read access point information and the detectedsignal strength value of the access point to which the access pointinformation belongs; and detect one piece of access point informationthat is selected by a user according to the signal strength value fromthe access point information output by the terminal device 1502, and usethe piece of access point information as the target access pointinformation.

In this manner, the user can select desirable access point informationas the target access point information.

In an implementation manner, the foregoing access point informationincludes an access point account. Correspondingly, a manner in which theterminal device 1502 establishes, according to the target access pointinformation, the wireless connection to the access point 1503 to whichthe target access point information belongs may be as follows: theterminal device 1502 is configured to: send, according to a targetaccess point account, a wireless connection request to the access point1503 to which the target access point account belongs, where thewireless connection request includes an access password bound to thetarget access point account; and receive a wireless connection successresponse that is sent after the access point 1503 to which the targetaccess point account belongs verifies that the access password bound tothe target access point account is correct.

In an implementation manner, the foregoing access point informationincludes an access point account and an access password bound to theaccess point account. Correspondingly, a manner in which the terminaldevice 1502 establishes, according to the target access pointinformation, the wireless connection to the access point 1503 to whichthe target access point information belongs may be as follows: theterminal device 1502 is configured to: send, according to a targetaccess point account, a wireless connection request to the access point1503 to which the target access point account belongs; receive promptinformation sent by the access point 1503 to which the target accesspoint account belongs, where the prompt information is used to promptsending of an access password bound to the target access point account;send the access password bound to the target access point account to theaccess point 1503 to which the target access point account belongs; andreceive a wireless connection success response that is sent after theaccess point 1503 to which the target access point account belongsverifies that the access password bound to the target access pointaccount is correct.

In an implementation manner, when the foregoing access point informationincludes an access point account and an access password bound to theaccess point account, a manner in which the terminal device 1502establishes, according to the target access point information, thewireless connection to the access point 1503 to which the target accesspoint information belongs may be as follows: the terminal device 1503 isconfigured to: send, according to a target access point account, awireless connection request to the access point 1503 to which the targetaccess point account belongs; receive prompt information sent by theaccess point 1503 to which the target access point account belongs,where the prompt information is used to prompt sending of an accesspassword bound to the target access point account; send the accesspassword bound to the target access point account to the access point1503 to which the target access point account belongs; and receive awireless connection success response that is sent after the access point1503 to which the target access point account belongs verifies that theaccess password bound to the target access point account is correct.

In an implementation manner, the terminal device 1502 is furtherconfigured to store the access point information after reading theaccess point information stored in the NFC tag 1501.

In an implementation manner, the terminal device 1502 is furtherconfigured to: after storing the access point information, determinewhether a storage time of the access point information exceeds a presetthreshold; and if the storage time exceeds the preset threshold, deletethe stored access point information.

In an implementation manner, the terminal device 1502 is furtherconfigured to: after storing the access point information, detectwhether a wireless disconnection instruction entered by the user isreceived; and if the wireless disconnection instruction entered by theuser is received, delete the stored access point information.

In this embodiment of the present invention, the foregoing access pointinformation includes one or more pieces of WIFI access point informationand Bluetooth access point information.

In the system described in FIG. 15, a terminal device can not onlycomplete automatic access to an access point, but also avoid operationsof manually enabling access point search and manually entering apassword by a user, so that efficiency in accessing the access point canbe effectively improved.

The foregoing wireless access method, terminal device, and system thatare disclosed in the embodiments of the present invention are not onlyapplicable to a public place or a house in which only one access pointis deployed, but also applicable to a public place or a house in whichmultiple access points are deployed, which is not limited in thisembodiment of the present invention.

According to the foregoing wireless access method, terminal device, andsystem that are disclosed in the embodiments of the present invention,an NFC tag stores an access point account and an access password boundto the access point account, so that access point information may not bedisplayed in a plaintext manner. A user that needs to implementinterconnection with the Internet by using an access point only needs tohold a terminal to approach the NFC tag, so as to execute the wirelessaccess method disclosed in the embodiments of the present invention.When the NFC tag is fixed in places such as a house and a shop, a“freeloading” operation that is performed by a user that staysrelatively far from places such as a house and a shop and that is causedbecause access point information is displayed in a plaintext manner canbe avoided.

In the foregoing embodiments, the descriptions of the embodiments haverespective focuses. For a part that is not described in detail in anembodiment, reference may be made to related descriptions in otherembodiments.

Persons of ordinary skill in the art may understand that all or a partof the steps of the foregoing method embodiments may be implemented by aprogram instructing hardware related to a terminal device. The foregoingprogram may be stored in a computer readable storage medium. When theprogram runs, the steps of the foregoing method embodiments areperformed. The foregoing storage medium includes: any medium that canstore program code, such as a USB flash drive, a read-only memory (ROM),a random access memory (RAM), a magnetic disk, or an optical disc.

The foregoing describes in detail the wireless access method, and therelated device and system disclosed in the embodiments of the presentinvention. Specific examples are used in this specification to describethe principle and implementation manners of the present invention. Thedescriptions of the foregoing embodiments are merely intended tofacilitate understanding of the method and core idea of the presentinvention. In addition, with respect to the specific implementationmanners and the application scope, modifications may be made by personsof ordinary skill in the art according to the idea of the presentinvention. In conclusion, the content of this specification shall not beconstrued as a limitation on the present invention.

1-20. (canceled)
 21. A method, comprising: reading, by a terminaldevice, wireless fidelity (WIFI) access point information stored in anexternal near field communication (NFC) tag, wherein the terminal devicereads the WIFI access point information when the terminal device isplaced in a location proximate to the external NFC tag, wherein an NFCfunction of the terminal device is enabled and a WIFI function of theterminal device is disabled during the reading of the WIFI access pointinformation, and wherein the WIFI access point information comprises aWIFI access point account and a WIFI access password bound to the WIFIaccess point account; acquiring, by the terminal device, target accesspoint information from the WIFI access point information; when thetarget access point information is WIFI access point information,enabling, by the terminal device, the WIFI function of the terminaldevice, and sending, by the terminal device, a wireless connectionrequest to an access point to which the target access point informationbelongs; and establishing, by the terminal device according to thetarget access point information, a wireless connection to the accesspoint to which the target access point information belongs.
 22. Themethod according to claim 21, wherein the WIFI access point account andthe WIFI access password bound to the WIFI access point account arewritten into the external NFC tag by the terminal device before theterminal device reads the WIFI access point information.
 23. The methodaccording to claim 21, acquiring, by the terminal device, the targetaccess point information from the WIFI access point informationcomprises: detecting, by the terminal device, a signal strength value ofeach access point to which each piece of the read WIFI access pointinformation belongs; and selecting, by the terminal device, access pointinformation of an access point whose signal strength value is thelargest as the target access point information.
 24. The method accordingto claim 21, wherein acquiring, by the terminal device, the targetaccess point information from the WIFI access point informationcomprises: detecting, by the terminal device, a signal strength value ofeach access point to which each piece of the read WIFI access pointinformation belongs; outputting, by the terminal device, each piece ofthe read WIFI access point information and the respective signalstrength value of each access point to which each piece of the read WIFIaccess point information belongs; and detecting, by the terminal device,one piece of read WIFI access point information that is selected by auser according to each signal strength value output by the terminaldevice, and using the one piece of read WIFI access point information asthe target access point information.
 25. The method according to claim21, wherein establishing the wireless connection to the access point towhich the target access point information belongs comprises: sending, bythe terminal device according to a target access point account, awireless connection request to an access point to which the targetaccess point account belongs, wherein the wireless connection requestcomprises an access password bound to the target access point account,and wherein the target access point account and the access passwordbound to the target access point account are obtained from the WIFIaccess point information; and receiving a wireless connection successresponse, wherein the wireless connection success response is sent afterthe access point to which the target access point account belongsverifies that the access password bound to the target access pointaccount is correct.
 26. The method according to claim 21, whereinestablishing the wireless connection to the access point to which thetarget access point information belongs comprises: sending, by theterminal device according to a target access point account, a wirelessconnection request to an access point to which the target access pointaccount belongs, wherein the target access point account is obtainedfrom the WIFI access point information; receiving, by the terminaldevice, prompt information sent by the access point to which the targetaccess point account belongs, wherein the prompt information prompts theterminal device to send an access password bound to the target accesspoint account, the access password bound to the target access pointaccount is obtained from the WIFI access point information; sending, bythe terminal device, the access password bound to the target accesspoint account to the access point to which the target access pointaccount belongs; and receiving, by the terminal device, a wirelessconnection success response that is sent after the access point to whichthe target access point account belongs verifies that the accesspassword bound to the target access point account is correct.
 27. Themethod according to claim 21, wherein after reading the WIFI accesspoint information stored in the external NFC tag, the method furthercomprises: storing, by the terminal device, the read WIFI access pointinformation; determining, by the terminal device, whether a storage timeof the read WIFI access point information exceeds a preset threshold;and when the storage time exceeds the preset threshold, deleting thestored read WIFI access point information.
 28. A terminal device,comprising: a processor; a memory connected to the processor using abus; a coupler connected to the processor; and an antenna connected tothe coupler; wherein the memory stores a group of program code, and theprocessor is configured to invoke the program code stored in the memoryto: read wireless fidelity (WIFI) access point information stored in anexternal near field communication (NFC) tag, wherein the terminal devicereads the WIFI access point information when the terminal device isplaced in a location proximate to the external NFC tag, and wherein theWIFI access point information comprises a WIFI access point account anda WIFI access password bound to the WIFI access point account; acquiretarget access point information from the read WIFI access pointinformation; when the target access point information is WIFI accesspoint information, and when a WIFI function of the terminal devicedisabled, enable the WIFI function of the terminal device; send awireless connection request to an access point to which the targetaccess point information belongs; and establish, according to the targetaccess point information, a wireless connection between the antenna andthe access point to which the target access point information belongs.29. The terminal device according to claim 28, wherein the WIFI accesspoint account and the WIFI access password bound to the WIFI accesspoint account are written into the external NFC tag by the terminaldevice before the terminal device reads the WIFI access pointinformation.
 30. The terminal device according to claim 28, wherein theprocessor is configured to further invoke the program code stored in thememory to: attempt to detect a signal of each access point to which eachpiece of the read WIFI access point information belongs; calculate asignal strength value of each access point that is detected by theantenna; and select the target access point information by selecting anaccess point whose signal strength value is the largest.
 31. Theterminal device according to claim 28, wherein the processor isconfigured to further invoke the program code stored in the memory to:attempt to detect a signal of each access point to which each piece ofthe read WIFI access point information belongs; calculate a signalstrength value of each detected access point; output each piece of theread WIFI access point information and each calculated signal strengthvalue of each detected access point; and detect one piece of accesspoint information that is selected by a user according to eachcalculated signal strength value of each detected access point output bythe terminal device, and use the one piece of access point informationas the target access point information.
 32. The terminal deviceaccording to claim 28, wherein the processor is configured to furtherinvoke the program code stored in the memory to: send, according to atarget access point account, a wireless connection request to an accesspoint to which the target access point account belongs, wherein thewireless connection request comprises an access password bound to thetarget access point account, and wherein the target access point accountand the access password bound to the target access point account areobtained from the WIFI access point information; and wherein the antennais configured to receive a wireless connection success response that issent after the access point to which the target access point accountbelongs verifies that the access password bound to the target accesspoint account is correct.
 33. The terminal device according to claim 28,wherein the processor is configured to further invoke the program codestored in the memory to: control the antenna to send, according to atarget access point account, a wireless connection request to an accesspoint to which the target access point account belongs, wherein thetarget access point account is obtained from the WIFI access pointinformation; wherein the antenna is configured to: receive promptinformation sent by the access point to which the target access pointaccount belongs, wherein the prompt information prompts the sending ofan access password bound to the target access point account, wherein theaccess password bound to the target access point account is obtainedfrom the WIFI access point information; send the access password boundto the target access point account to the access point to which thetarget access point account belongs; and receive a wireless connectionsuccess response that is sent after the access point to which the targetaccess point account belongs verifies that the access password bound tothe target access point account is correct.
 34. The terminal deviceaccording to claim 28, wherein the processor is configured to: controlthe memory to store the read WIFI access point information; determinewhether a storage time of the read WIFI access point information exceedsa preset threshold; and when the storage time exceeds the presetthreshold, control the memory to delete the stored read WIFI accesspoint information.
 35. A wireless access system, comprising: a terminaldevice; and a near field communication (NFC) tag; wherein the NFC tag isconfigured to store wireless fidelity (WIFI) access point information,wherein the WIFI access point information comprises a WIFI access pointaccount and a WIFI access password bound to the WIFI access pointaccount; and wherein the terminal device is configured to: read the WIFIaccess point information stored in the NFC tag, wherein the terminaldevice reads the WIFI access point information when the terminal deviceis placed in a location proximate to the NFC tag, wherein an NFCfunction of the terminal device is enabled and a WIFI function of theterminal device is disabled during the reading of the WIFI access pointinformation; acquire target access point information from the read WIFIaccess point information; when the target access point information isWIFI access point information, enable the WIFI function of the terminaldevice; send a wireless connection request to an access point to whichthe target access point information belongs; and establish, according tothe target access point information, a wireless connection to the accesspoint to which the target access point information belongs.
 36. Thewireless access system according to claim 35, wherein the WIFI accesspoint account and the WIFI access password bound to the WIFI accesspoint account are written into the external NFC tag by the terminaldevice before the terminal device reads the WIFI access pointinformation.
 37. The wireless access system according to claim 35,wherein acquiring the target access point information from the read WIFIaccess point information comprises: detecting a signal strength value ofeach access point to which each piece of the read WIFI access pointinformation belongs; and selecting access point information of an accesspoint whose signal strength value is the largest as the target accesspoint information.
 38. The wireless access system according to claim 35,wherein acquiring the target access point information from the read WIFIaccess point information comprises: detecting a signal strength value ofeach access point to which each piece of the read access pointinformation belongs; outputting each piece of the read access pointinformation and each signal strength value of each access point to whicheach piece of the read WIFI access point information belongs; anddetecting one piece of access point information that is selected by auser according to each signal strength value output by the terminaldevice, and using the one piece of access point information as thetarget access point information.
 39. The wireless access systemaccording to claim 35, wherein establishing the wireless connection tothe access point to which the target access point information belongscomprises: sending according to a target access point account, awireless connection request to an access point to which the targetaccess point account belongs, wherein the wireless connection requestcomprises an access password bound to the target access point account,and wherein the target access point account and the access passwordbound to the target access point account are obtained from the WIFIaccess point information; and receiving a wireless connection successresponse that is sent after the access point to which the target accesspoint account belongs verifies that the access password bound to thetarget access point account is correct.
 40. The wireless access systemaccording to claim 35, wherein establishing the wireless connection tothe access point to which the target access point information belongscomprises: sending, according to a target access point account, awireless connection request to an access point to which the targetaccess point account belongs, wherein the target access point account isobtained from the WIFI access point information; receiving promptinformation sent by the access point to which the target access pointaccount belongs, wherein the prompt information prompts the sending ofan access password bound to the target access point account, and whereinthe access password bound to the target access point account is obtainedfrom the WIFI access point information; sending the access passwordbound to the target access point account to the access point to whichthe target access point account belongs; and receiving a wirelessconnection success response that is sent after the access point to whichthe target access point account belongs verifies that the accesspassword bound to the target access point account is correct.